#version 140


#define PI    3.14159265

in vec4 fColor0;
in vec2 texCoord;
uniform sampler2D mainTexture; 

out vec4 fragColor;

in vec4 normal;
in vec4 lightVector;
in vec4 lightColor;

void main(void)
{
 	//fragColor = texture2D(mainTexture, texCoord);
 	//fragColor = fColor0;
 	float factor = max(dot(normal, lightVector), 0.0);
 	fragColor = (fColor0/PI) * lightColor * factor;
}
